//package com.inspur.edp.bff.rtgenerator.generators.managergenerator.mgrImplclass.methodgenerators;
//
//import Inspur.Gsp.Caf.Generator.ClassMethodGenerator.*;
//import Inspur.Gsp.Caf.Generator.BaseInfoItem.*;
//import Microsoft.CodeAnalysis.CSharp.Syntax.*;
//import Microsoft.CodeAnalysis.CSharp.*;
//import Inspur.Gsp.Caf.Generator.Utils.*;
//import Inspur.Gsp.Web.LookupManager.*;
//import Inspur.Gsp.FormServer.Core.Manager.*;
//import Inspur.Gsp.FormServer.Api.Attr.*;
//import Inspur.Gsp.FormServer.Spi.*;
//import Microsoft.CodeAnalysis.*;
//
//public class GetElementHelpMethodGenerator extends ClassMethodGenerator
//{
//	private FSMgrImplGenContext fsMgrImplGenContext;
//	private static final String param_labelId = "labelId";
//	private static final String param_queryParam = "queryParam";
//	private static final String param_codeName = "codeName";
//
//	public GetElementHelpMethodGenerator(FSMgrImplGenContext fsMgrImplGenContext)
//	{
//		this.fsMgrImplGenContext = fsMgrImplGenContext;
//	}
//	@Override
//	protected BlockSyntax BuildMethodBody()
//	{
//		SwitchSectionSyntax[] result = GetSwitchSectionSyntaxes();
//		if (result == null)
//		{
//		  return SyntaxFactory.Block(SyntaxFactory.ThrowStatement(SyntaxFactory.ObjectCreationExpression(TypeUtils.GetTypeSyntax(RuntimeException.class)).WithArgumentList(SyntaxFactory.ArgumentList(SyntaxFactory.<ArgumentSyntax>SingletonSeparatedList(SyntaxFactory.Argument(SyntaxFactory.InvocationExpression(SyntaxFactory.MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, SyntaxFactory.PredefinedType(SyntaxFactory.Token(SyntaxKind.StringKeyword)), SyntaxFactory.IdentifierName("Format"))).WithArgumentList(SyntaxFactory.ArgumentList(SyntaxFactory.<ArgumentSyntax>SeparatedList(new SyntaxNodeOrToken[]{ SyntaxFactory.Argument(SyntaxFactory.LiteralExpression(SyntaxKind.StringLiteralExpression, SyntaxFactory.Literal("标识{0}的字段没有设置帮助配置，标识是codeName和labelId的组合"))), SyntaxFactory.Token(SyntaxKind.CommaToken), SyntaxFactory.Argument(SyntaxFactory.IdentifierName("labelId"))})))))))));
//
//		}
//	   return SyntaxFactory.Block(SyntaxFactory.<StatementSyntax>SingletonList(SyntaxFactory.SwitchStatement(SyntaxFactory.BinaryExpression(SyntaxKind.AddExpression, SyntaxFactory.IdentifierName("codeName"), SyntaxFactory.IdentifierName("labelId"))).WithSections(SyntaxFactory.<SwitchSectionSyntax>List(result))));
//	}
//
//	private SwitchSectionSyntax[] GetSwitchSectionSyntaxes()
//	{
//		java.lang.Class implType = fsMgrImplGenContext.FSGenContext.getMgrInterfaceAndType().get(0).getImplType();
////C# TO JAVA CONVERTER TODO TASK: There is no equivalent to implicit typing in Java:
//		var extendAttrs = implType.GetCustomAttributes(VMDataExtendAttribute.class, false);
//		if (extendAttrs.getLength() == 0)
//		{
//			return null;
//		}
////C# TO JAVA CONVERTER TODO TASK: There is no equivalent to implicit typing in Java:
//		var attr = (VMDataExtendAttribute)extendAttrs[0];
////C# TO JAVA CONVERTER TODO TASK: There is no equivalent to implicit typing in Java:
//		var entityType = attr.EntityDataType;
////C# TO JAVA CONVERTER TODO TASK: There is no equivalent to implicit typing in Java:
//		var rootAttribute = entityType.GetCustomAttributes(VMRootAttribute.class, false);
////C# TO JAVA CONVERTER TODO TASK: There is no equivalent to implicit typing in Java:
//		var mappingType = ((VMRootAttribute)rootAttribute[0]).MappingType;
//		if (mappingType == null)
//		{
//			return null;
//		}
//		Object tempVar = Activator.CreateInstance(mappingType);
//		IHelpMapping mapping = (IHelpMapping)((tempVar instanceof IHelpMapping) ? tempVar : null);
//		java.util.ArrayList<SwitchSectionSyntax> result = new java.util.ArrayList<SwitchSectionSyntax>();
////C# TO JAVA CONVERTER TODO TASK: There is no equivalent to implicit typing in Java:
//		var configInfo = mapping.HelpConfig;
//		for (String key : configInfo.keySet())
//		{
//			SwitchSectionSyntax syntax = SyntaxFactory.SwitchSection().WithLabels(SyntaxFactory.<SwitchLabelSyntax>SingletonList(SyntaxFactory.CaseSwitchLabel(SyntaxFactory.LiteralExpression(SyntaxKind.StringLiteralExpression, SyntaxFactory.Literal(key))))).WithStatements(SyntaxFactory.<StatementSyntax>List(new StatementSyntax[]{ SyntaxFactory.ReturnStatement(SyntaxFactory.InvocationExpression(SyntaxFactory.IdentifierName("GetElementHelpTool")).WithArgumentList(SyntaxFactory.ArgumentList(SyntaxFactory.<ArgumentSyntax>SeparatedList(new SyntaxNodeOrToken[]{ SyntaxFactory.Argument(SyntaxFactory.LiteralExpression(SyntaxKind.StringLiteralExpression, SyntaxFactory.Literal(configInfo[key].HelpId))), SyntaxFactory.Token(SyntaxKind.CommaToken), SyntaxFactory.Argument(SyntaxFactory.IdentifierName("queryParam"))})))), SyntaxFactory.BreakStatement()}));
//			result.add(syntax);
//		}
//
////C# TO JAVA CONVERTER TODO TASK: There is no equivalent to implicit typing in Java:
//	   var defaultExpress= SyntaxFactory.SwitchSection().WithLabels(SyntaxFactory.<SwitchLabelSyntax>SingletonList(SyntaxFactory.DefaultSwitchLabel())).WithStatements(SyntaxFactory.<StatementSyntax>SingletonList(SyntaxFactory.ThrowStatement(SyntaxFactory.ObjectCreationExpression(TypeUtils.GetTypeSyntax(RuntimeException.class)).WithArgumentList(SyntaxFactory.ArgumentList(SyntaxFactory.<ArgumentSyntax>SingletonSeparatedList(SyntaxFactory.Argument(SyntaxFactory.InvocationExpression(SyntaxFactory.MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, SyntaxFactory.PredefinedType(SyntaxFactory.Token(SyntaxKind.StringKeyword)), SyntaxFactory.IdentifierName("Format"))).WithArgumentList(SyntaxFactory.ArgumentList(SyntaxFactory.<ArgumentSyntax>SeparatedList(new SyntaxNodeOrToken[]{ SyntaxFactory.Argument(SyntaxFactory.LiteralExpression(SyntaxKind.StringLiteralExpression, SyntaxFactory.Literal("标识{0}的字段没有设置帮助配置，标识是codeName和labelId的组合"))), SyntaxFactory.Token(SyntaxKind.CommaToken), SyntaxFactory.Argument(SyntaxFactory.IdentifierName("labelId"))}))))))))));
//		result.add(defaultExpress);
//		return result.toArray(new SwitchSectionSyntax[]{});
//	}
//
//	@Override
//	protected java.util.ArrayList<MethodAccessModifier> GetAccessModifiers()
//	{
//		return new java.util.ArrayList<MethodAccessModifier>(java.util.Arrays.asList(new MethodAccessModifier[] { MethodAccessModifier.Public, MethodAccessModifier.Override }));
//	}
//
//	@Override
//	protected String GetMethodName()
//	{
//		return "GetElementHelp";
//	}
//
//	@Override
//	protected java.util.ArrayList<ParameterGenerateInfo> GetParameterCollection()
//	{
//		ParameterGenerateInfo tempVar = new ParameterGenerateInfo();
//		tempVar.ParameterType=String.class;
//		tempVar.ParameterName=param_codeName;
//		ParameterGenerateInfo tempVar2 = new ParameterGenerateInfo();
//		tempVar2.ParameterType=String.class;
//		tempVar2.ParameterName=param_labelId;
//		ParameterGenerateInfo tempVar3 = new ParameterGenerateInfo();
//		tempVar3.ParameterType=String.class;
//		tempVar3.ParameterName=param_queryParam;
//		return new java.util.ArrayList<ParameterGenerateInfo>(java.util.Arrays.asList(new ParameterGenerateInfo[] { tempVar, tempVar2, tempVar3 }));
//	}
//
//	@Override
//	protected java.lang.Class GetReturnType()
//	{
//		return LookupResult.class;
//	}
//}